<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<html>
  	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	%>
  <head>
    <meta charset="UTF-8">
    <title>客户首页</title>
    <link href=<%=basePath+"/stylesheets/index.css"%> type="text/css" rel="stylesheet">
    <style>
        html,body{
            height: 100%;
            margin:0;
            padding: 0;
        }
    </style>
</head>
  <body>
  <%
  		String account = (String)session.getAttribute("account");
  		String msg = (String)session.getAttribute("msg");
  		if(msg!=null&&msg!=""){
  			%>
  					<script type="text/javascript" language="javascript">
  						var msg = '<%=msg%>'
	    				alert(msg);
	    			</script>
  			<%
  		}
  		session.removeAttribute("msg");
   %>
   <%
   		//检测用户有无完善信息
   		
    %>
    <div id="leftFrame">
	    <div id="headPhotoDiv">
	        <img src=<%=basePath+"/images/admin.jpg" %>  id="adminPhotoImg">
	        <p id="name">客户：<%=account %></p>
	        <button onclick="window.location.href='http://localhost:8080/HotelSystem/login.jsp'" id="outBtn">退出账号</button>
	    </div>
	    <% 
	    	System.out.println("session:"+session.getAttribute("name"));
	    %>
	    <div style="text-align: center">
	        <ul id="choieFrame">
	            <li type="disc">
                    <a href="http://localhost:8080/HotelSystem/realTimeRoom.jsp" target="rightFrame">实时房态</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/registerInHome.jsp" target="rightFrame">入住登记</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/myOrder.jsp" target="rightFrame">个人订单</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/myInfo.jsp" target="rightFrame">个人信息</a>
                </li>
	        </ul>
	    </div>
	</div>
	<iframe id="rightFrame" name="rightFrame" src="http://localhost:8080/HotelSystem/realTimeRoom.jsp" frameborder="0"></iframe>  
	
  </body>
</html>
